package com.study.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.study.dao.StudentDao;
import com.study.model.StudentInfo;

@Component
public class StudentService {
	
	@Autowired
	private StudentDao studentDao;
	
	public int save(StudentInfo info){
		return studentDao.save(info);
	}
	
	public void delete(int id){
		studentDao.delete(id);
	}
	
	public void update(StudentInfo info){
		studentDao.update(info);
	}
	public StudentInfo queryById(int id){
		return studentDao.queryById(id);
		
	}
	
	public List<StudentInfo> queryAll(){
		return studentDao.queryAll();
	}
	
	
	
	

}
